On a Logical Foundation for Explicit Substitutions

نویسنده

  • Frank Pfenning
چکیده

ing Meta-Variables • Propositional reflection of meta-variables ∆, u:A[Ψ]; Γ ⊢ M : B ∆;Γ ⊢ λU.M : [Ψ]A → B →I ∆;Γ ⊢ M : [Ψ]A → B ∆;Ψ ⊢ N : A ∆;Γ ⊢ M (Ψ. N) : B →E • New reduction (λU.M) (Ψ. N) → [(Ψ. N)/U ]M RDP’07, Paris, June 07 – p.34 Incomplete Proofs, Rerevisited • Now open leaves have form ∆;Γ ⊢ ? : A • Need meta-variables U • New meta-hypothesis rule U : A[Σ;Ψ] ∈ ∆ ∆; ∆; Γ ⊢ (σ;σ) : (Σ;Ψ) ∆; ∆; Γ ⊢ U[σ;σ] : A mhyp • Not practical • Not expressively complete unless we close system under formation of meta-variables at any level RDP’07, Paris, June 07 – p.35 A Multi-Level System • Unify in a multi-level system • Models open derivations at any level • Variables x at level k ≥ 0 • Ordinary variables x for k = 0 • Meta-variables x for k = 1 (so far: U ) • Unified contexts ∆ ::= • | ∆, x : A[Ψ] • Ψ means n < k for all declarations x : A[Γ] in Ψ • For declarations x : A[Ψ], Ψ = (•) is forced! RDP’07, Paris, June 07 – p.36 Variables and Substitutions • Unified hypothesis rule x:A[Ψ] ∈ ∆ ∆ ⊢ σ : Ψ ∆ ⊢ x[σ] : A hyp • Substitution typing ∆ ⊢ (•) : (•) ∆ ⊢ σ : Ψ ∆|n,Γ n ⊢ M : A (n < k) ∆ ⊢ (σ, (Γ.M)) : (Ψ, x:A[Γ]) • ∆|n keeps only y for m ≥ n. • Enforces categorical restriction RDP’07, Paris, June 07 – p.37 Abstraction and Applicationion and Application • Typing rules ∆, x:A[Ψ] ⊢ M : B ∆ ⊢ λx.M : [Ψ]A → B →I ∆ ⊢ M : [Ψ]A → B ∆|k,Ψ k ⊢ N : A ∆ ⊢ M (Ψ. N) : B →E • [(•)]A → B as A ⊃ B • [(•)]A → B as A ⊃ B in IS4 • [(•)]A → B as A ⊃ B where A true if A true without using assumptions about truth or validity RDP’07, Paris, June 07 – p.38 Substitution Principle • Write σ if ∆ ⊢ σ : Ψ • M [σ] substitutes • for all variables in M of level n < k • for no variables in M of level n ≥ k • Typing guide ∆|k,Ψ k ⊢ M : A ∆ ⊢ σ : Ψ ∆ ⊢ M [σ] : A RDP’07, Paris, June 07 – p.39 Substitution Definition • Critical cases, extended compositionally (x[τ])[σ] = M [τ[σ]] for n < k, M/x ∈ σ = x[τ[σ]] for n ≥ k (λx.M)[σ] = λx.M [σ, x/x] for n < k = λx.M [σ] for n ≥ k (M (Γ. N))[σ] = (M [σ]) (Γ. N [σ|n, id n Γ ]) for n < k = (M [σ]) (Γ. N) for n ≥ k RDP’07, Paris, June 07 – p.40 Substitution Composition • Typing guide ∆|k,Ψ k ⊢ τ : Θ ∆ ⊢ σ : Ψ ∆ ⊢ τ [σ] : Θ • Definition (τ, (Γ.M)/x)[σ] = (τ [σ], (Γ.M [σ|n, id n Γ ])/x) for n < k = (τ [σ], (Γ.M)/x) for n ≥ k RDP’07, Paris, June 07 – p.41 Single Substitutions, Rerevisited • Typing guide ∆|k,Ψ k ⊢ N : B ∆, x:B[Ψ] ⊢ M : A ∆ ⊢ [(Ψ. N)/x]M : A • Compositional, similar to simultaneous substitution • Show only one case [(Ψ. N)/x](x[σ]) = N [σ 1 /Ψ] for σ 1 = [(Ψ. N)/x](σ) RDP’07, Paris, June 07 – p.42 Example, Modified and Revisited • Omit suspension [(•)] and closure (•). s : B[u:A ∧B], t : C[v:A,w:A ⊃ C] ⊢ λx. 〈s[x], λy. t[π1x , y]〉 : (A ∧B) ⊃ B ∧ ((A ⊃ C) ⊃ C) • Simultaneous substitution at level 2 σ = ((u. π2u )/s, (v, w. w v)/t) • Crucial part (t1[π1x , y0])[σ , x/x, y/y] = (w v0)[π1x /v, y/w] = y (π1x ) RDP’07, Paris, June 07 – p.43 Summary, Multi-Level System • Uniform system of meta-variables x • Contextual type x : A[Ψ] • Closed with respect to variables y for n < k • Suspensions x[σ] where σ : Ψ • Level 0: ordinary variables • Level 1: meta-variables • Variables at all levels can be abstracted and applied • Satisfies α-conversion, subject reduction RDP’07, Paris, June 07 – p.44 Ongoing Work, Theory • Identity principle, subject expansion • Extension to dependent types • In ∆, x:A[Ψ], A can depend on variables in ∆|k and Ψ • If ∆ ctx then ∆|k ctx • Conjecture substitution and identity properties • Checked for k = 2 (contextual modal type theory) • Polymorphism? Substitution variables? • Structural vs nominal contexts RDP’07, Paris, June 07 – p.45 Ongoing Work, Pragmatics • Integrating single-variable and simultaneous substitution • De Bruijn representation • Uniform numbering of all levels(?) • ∆|k marks variables x for n < k as invisible • Level annotations and reconstruction RDP’07, Paris, June 07 – p.46

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Linear Explicit Substitutions

The-calculus adds explicit substitutions to the-calculus so as to provide a theoretical framework within which the implementation of functional programming languages can be studied. This paper gen-eralises the-calculus to provide a linear calculus of explicit substitutions , called xDILL, which analogously describes the implementation of linear functional programming languages. Our main observa...

متن کامل

Linear lambda calculus with explicit substitutions as proof-search in Deep Inference

SBV is a deep inference system that extends the set of logical operators of multiplicative linear logic with the non commutative operator seq. We introduce the logical system SBVrwhich extends SBV by adding a self-dual atom-renaming operator to it. We prove that the cut elimination holds on SBVr. SBVr and its cut free subsystem BVr are complete and sound with respect to linear Lambda calculus w...

متن کامل

A Theory of Explicit Substitutions with Safe and Full Composition

Many different systems with explicit substitutions have been proposed to implement a large class of higher-order languages. Motivations and challenges that guided the development of such calculi in functional frameworks are surveyed in the first part of this paper. Then, very simple technology in named variable-style notation is used to establish a theory of explicit substitutions for the lambd...

متن کامل

Marek A . Bednarczyk Explicit Substitution into Action A non - monotone logic for reasoning about actions and change Nr 942 Warszawa , February 2002

A logic LP σ for reasoning about change is presented. The logic, an extension of the logic of predicates with equalitu, is based on the idea that explicit substitutions can be seen as atomic formulae describing basic change of the state of a system. The logic is substructural: non-monotone and non-commutative. Its Platonic, i.e., predicate part is governed by the additive connectives, while the...

متن کامل

Cut Rules and Explicit Substitutions RENÉ

We introduce a method to associate calculi of proof terms and rewrite rules with cut elimination procedures for logical deduction systems (i.e., Gentzen-style sequent calculi) in the case of intuitionistic logic. We illustrate this method using two different versions of the cut rule for a variant of the intuitionistic fragment of Kleene's logical deduction system G3. Our systems are in fact cal...

متن کامل

Explicit Substitutions and Programming Languages

The λ-calculus has been much used to study the theory of substitution in logical systems and programming languages. However, with explicit substitutions, it is possible to get finer properties with respect to gradual implementations of substitutions as effectively done in runtimes of programming languages. But the theory of explicit substitutions has some defects such as non-confluence or the n...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007